// import { LoadingController, Loading, ToastController, Toast } from "../../../node_modules/ionic-angular/umd";
import { LoadingController, Loading, ToastController, Toast } from  'ionic-angular';;



export abstract class BaseUI {

    constructor() {}

    // 通用的全局的Loading的显示方法
    protected showLoading(loadCtrl: LoadingController, message:string):Loading {
        let loader = loadCtrl.create({
            content: message,
            dismissOnPageChange: true
        })
        loader.present();
        return loader;
    }
 
    /**
     *通用的全局的toat显示方法
     * 
     * @protected
     * @param {ToastController} toadCtrl
     * @param {string} message
     * @returns {Toast}
     * @memberof BaseUI
     */
    protected showToad(toadCtrl: ToastController, message: string):Toast {
        let toater = toadCtrl.create({
            message: message,
            duration: 3000
        }); 
        toater.present();
        return toater;
    }   

}